//接口统一管理
import {$http,$get,$post}  from "@/api/request.js";

//登录
export const reqLogin=(user)=>{
    return $post("/addons/exam/User/login",user);
}
//保存修改个人信息
export const setUserInfo=(data)=>{
    return $post("/addons/exam/User/save",data);
}
//首页banner
export const getHomeBanner=()=>{
    return $get("/api/xiluedu/Article/lists");
}
//首页课程
export const getHomeCourseList=(data)=>{
    return $post("/api/xiluedu/Course/lists",data);
}
//课程列表
export const getCourseList=(data)=>{
    return $get("/api/xiluedu/Course/courseLlist",data);
}
//章节列表
export const getChapterList=(data)=>{
    return $get("/api/xiluedu/Course/chapters",data);
}
//获取对应教材的全部题目列表
export const getQuestionList=(data)=>{
    return $post("/addons/exam/Question/questionList",data);
}
//提交答题
export const submitQuestionList=(data)=>{
    return $post("/addons/exam/Paper/submit",data);
}
// 跳过答题
export const skipQuestion=(data)=>{
    return $post("/addons/exam/Question/skipTolog",data);
}
//声音模板
export const AudioVoice=()=>{
    return $post("/api/Audio/speaker");
}
//课程详情
export const CourseDetails=(data)=>{
    return $get("/api/xiluedu/Course/course_detail",data);
}
//音频查询
export const getAudioVoice=(data)=>{
    return $post("/api/Audio/query_voice",data);
}

//答题记录
export const getGradeLog=(data)=>{
    return $get("/addons/exam/Question/getGradeLog",data);
}
//答题列表
export const getQuestionDeatil=(data)=>{
    return $get("/addons/exam/Question/questionDeatil",data);
}